home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS069.dsk
/
TWONKY I.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
6KB
|
232 lines
100 REM *** M CAPELLA ***
110 REM TWONKY
120 REM CREATIVE COMPUTING
130 REM MAY 1977 VOL #3 NO 3
140 GOSUB 2250
150 DIM A(15,15)
160 R9 = 0
170 GOSUB 1840
180 PRINT "--------------------------------------"
190 PRINT
200 GOSUB 1460
210 PRINT
220 PRINT "MOVE OR SHOOT (M/S)"
230 INPUT Q8$
240 IF Q8$ = "M" THEN 270
250 IF Q8$ = "S" THEN 960
260 GOTO 210
270 PRINT "WHICH WAY (F/B/R/L)"
280 INPUT Q8$
290 IF Q8$ = "F" THEN 340
300 IF Q8$ = "B" THEN 370
310 IF Q8$ = "L" THEN 400
320 IF Q8$ = "R" THEN 430
330 GOTO 210
340 X5 = X
350 Y5 = Y -1
360 GOTO 460
370 X5 = X
380 Y5 = Y +1
390 GOTO 460
400 X5 = X -1
410 Y5 = Y
420 GOTO 460
430 X5 = X +1
440 Y5 = Y
450 GOTO 460
460 IF X5 <1 THEN 510
470 IF X5 >15 THEN 510
480 IF Y5 <1 THEN 510
490 IF Y5 >15 THEN 510
500 GOTO 540
510 PRINT "THAT MOVE TAKES YOU OUT OF THE MAZE!"
520 PRINT "MOVE NOT ALLOWED!!"
530 GOTO 1430
540 ON (A(X5,Y5) +1) GOTO 560,640,640,770,810,930
550 INVERSE : PRINT "ERROR<CTRL-G><CTRL-G><CTRL-G>!": NORMAL : END
560 A(X,Y) = 0
570 A(X5,Y5) = 1
580 X = X5
590 Y = Y5
600 PRINT "MOVE ALLOWED"
610 GOTO 1430
640 PRINT "THAT SPACE IS BLOCKED"
650 GOTO 1430
670 INVERSE : PRINT "YOU HAVE BEEN R E L O C A T E D !!!": NORMAL
680 GOSUB 2720
690 IF A(Z,W) >2 THEN 540
700 IF A(Z,W) < >0 THEN 680
710 A(Z,W) = 1
720 A(X,Y) = 0
730 X = Z
740 Y = W
750 GOTO 1430
770 INVERSE : PRINT "YOU HIT THE SUPER TRAP !!": NORMAL : PRINT : PRINT : PRINT "YOU GET A NEW MAZE !"
780 GOSUB 1840
790 GOTO 1430
810 PRINT
820 PRINT "I DON'T BELIEVE IT BUT": PRINT " YOU WON !<CTRL-G><CTRL-G><CTRL-G><CTRL-G><CTRL-G>"
830 PRINT : PRINT "YOU GOT TO THE OBJECTIVE BEFORE"
840 PRINT "THE TWONKY GOT YOU"
850 PRINT : PRINT
870 PRINT "TRY AGAIN (Y/N) "
880 INPUT Q8$
890 IF Q8$ = "Y" THEN 160
900 IF Q8$ = "N" THEN 2750
910 GOTO 870
930 PRINT "YOU STEPPED ON THE TWONKY!"
940 GOTO 1790
960 PRINT "WHICH WAY (F/B/R/L)"
970 INPUT Q8$
980 IF Q8$ = "F" THEN 1030
990 IF Q8$ = "B" THEN 1060
1000 IF Q8$ = "L" THEN 1090
1010 IF Q8$ = "R" THEN 1120
1020 GOTO 210
1030 S1 = 0
1040 S2 = -1
1050 GOTO 1140
1060 S1 = 0
1070 S2 = 1
1080 GOTO 1140
1090 S1 = -1
1100 S2 = 0
1110 GOTO 1140
1120 S1 = 1
1130 S2 = 0
1140 R1 = X
1150 R2 = Y
1160 R1 = R1 +S1
1170 R2 = R2 +S2
1180 PRINT " Z A P --<CTRL-G>-"
1190 IF R1 <1 THEN 1240
1200 IF R1 >15 THEN 1240
1210 IF R2 <1 THEN 1240
1220 IF R2 >15 THEN 1240
1230 GOTO 1280
1240 PRINT "FIZZLE.."
1250 PRINT "..SHOT LEFT MAZE"
1260 PRINT "....SHOT MISSED"
1270 GOTO 1430
1280 IF A(R1,R2) < >2 THEN 1330
1290 PRINT "B L A S T ! "
1300 PRINT " YOU HIT WALL"
1310 PRINT " SHOT MISSED"
1320 GOTO 1430
1330 IF A(R1,R2) < >6 THEN 1160
1340 PRINT " OUCH!"
1350 PRINT "TWONKY RETREATS"
1360 A(R1,R2) = R9
1370 GOSUB 2720
1380 IF A(Z,W) < >0 THEN 1370
1390 A(Z,W) = 6
1400 R9 = 0
1410 X1 = Z
1420 Y1 = W
1430 GOSUB 1460
1440 GOTO 1580
1460 PRINT
1470 PRINT "THE TWONKY IS ";
1480 D = ( SQR( ABS((X1 -X) ^2 +(Y1 -Y) ^2)))
1490 PRINT D;
1500 PRINT " UNITS AWAY"
1510 PRINT "THE OBJECTIVE ";
1520 D1 = ( SQR( ABS((X2 -X) ^2 +(Y2 -Y) ^2)))
1530 PRINT D1;
1540 PRINT " UNITS AWAY"
1550 PRINT
1560 RETURN
1580 IF D <2 THEN 1790
1590 Z2 = Y1
1600 Z1 = X1
1610 IF X <X1 THEN 1680
1620 IF X >X1 THEN 1700
1630 IF Y <Y1 THEN 1660
1640 Z2 = Y1 +1
1650 GOTO 1710
1660 Z2 = Y1 -1
1670 GOTO 1710
1680 Z1 = X1 -1
1690 GOTO 1710
1700 Z1 = X1 +1
1710 A(X1,Y1) = R9
1720 R9 = A(Z1,Z2)
1730 A(Z1,Z2) = 6
1740 X1 = Z1
1750 Y1 = Z2
1760 PRINT : PRINT "TWONKY MOVES"
1770 GOSUB 1460
1780 IF D > = 2 THEN 210
1790 PRINT
1800 PRINT "> > > S C H L O O R P ! ! ! < < < "
1810 PRINT : PRINT "THE TWONKY JUST ABSORBED YOU !"
1820 PRINT "YOU LOST !!!!!!!!!!!!": GOTO 850
1840 FOR I = 0 TO 15
1850 FOR Z = 0 TO 15
1860 A(I,Z) = 0
1870 NEXT Z
1880 NEXT I
1910 FOR I = 1 TO 30
1920 GOSUB 2720
1930 IF A(Z,W) < >0 THEN 1920
1940 A(Z,W) = 2
1950 NEXT I
1970 FOR I = 1 TO 22
1980 GOSUB 2720
1990 IF A(Z,W) < >0 THEN 1980
2000 A(Z,W) = 3
2010 NEXT I
2030 GOSUB 2720
2040 IF A(Z,W) < >0 THEN 2030
2070 GOSUB 2720
2080 IF A(Z,W) < >0 THEN 2070
2090 A(Z,W) = 1
2100 X = Z
2110 Y = W
2130 GOSUB 2720
2140 IF A(Z,W) < >0 THEN 2130
2150 A(Z,W) = 5
2160 X2 = Z
2170 Y2 = W
2190 GOSUB 2720
2200 IF A(Z,W) < >0 THEN 2190
2210 A(Z,W) = 6
2220 X1 = Z
2230 Y1 = W
2240 RETURN
2250 HOME : VTAB 5
2280 PRINT ; TAB( 15);: INVERSE : PRINT "TWONKY": NORMAL
2282 PRINT " "
2283 PRINT "BY MARK CAPPELLA"
2284 PRINT " "
2285 PRINT "FM PG 110 OF M/J CREATIVE COMPUTING"
2286 PRINT "LISTED BY DAVID AMES"
2287 PRINT " "
2300 VTAB 15
2310 INPUT "DO YOU WANT INSTRUCTIONS (Y/N) ?";Q8$
2330 IF Q8$ = "N" THEN 2700
2340 IF Q8$ < >"Y" THEN 2310
2350 HOME
2380 PRINT "THIS IS THE GAME OF TWONKY"
2400 PRINT : PRINT : PRINT " YOU HAVE LANDED ON THE PLANET OF"
2410 PRINT "TWINKY AND IT'S KING HAS CAPTURED YOU"
2450 PRINT "HE HAS PUT YOU IN A MAZE THAT IS 15 * 15"
2460 PRINT "YOU ARE IN THE DARK YOU MUST GET TO ": PRINT "THE OBJECTIVE SQUARE TO BE SET FREE !"
2470 PRINT : PRINT " HAZARDS INCLUDE:": PRINT : PRINT
2480 PRINT "SQUARES THAT YOU CAN NOT GO INTO (30)": PRINT "SQUARES THAT RANDOMLY THROW YOU AROUND THE MAZE (22)"
2490 PRINT " A SQUARE THAT RESTARTS EVERYTHING ! "
2500 PRINT : PRINT
2510 PRINT "THEN THERE IS ";: FLASH : PRINT "THE TWONKY": NORMAL
2520 PRINT "<CR>": INPUT Q$
2530 PRINT : PRINT "WHO CHASES YOU AND ABSORBS YOU IF HE": PRINT "GETS LESS THAN 2 UNITS FROM YOU "
2540 PRINT "HE IS IMMUNE TO ALL TRAPS!!! "
2550 PRINT : PRINT : PRINT "YOU CAN MOVE ONE SQUARE PER TURN": PRINT " SHOOT IN ONE DIRECTION "
2560 PRINT "IF THE TWONKY IS HIT HE DISPLACES TO": PRINT "SOME OTHER SQUARE "
2570 PRINT : PRINT : PRINT " G O O D L U C K !"
2580 PRINT : PRINT "CR": INPUT Q$
2700 RETURN
2720 Z = ( INT( RND(1) *15) +1)
2730 W = ( INT( RND(1) *15) +1)
2740 RETURN
2750 END
9999 PRINT " SAVE TWONKY "